import axios from '@/api/fetch';
import SERVER from '@/api/server';

//通过父级id获取下级
export const tree = params => axios.get(`${SERVER.CMSCLOUD_MARKET}/paramdefinition/marketMaterialType/tree`, { params });

//添加节点
export const addMaterialType = (params) => axios.post(`${SERVER.CMSCLOUD_MARKET}/paramdefinition/marketMaterialType`, params);

// 修改
export const updateMaterialType = (params, id) => axios.put(`${SERVER.CMSCLOUD_MARKET}/paramdefinition/marketMaterialType/${id}`, params);
